The present invention relates generally to a method, system, and apparatus for loading and managing tasks on a computer system.
Typically, a process operating on a computer system has managed only one thread at a time. Therefore, the operation of running multiple threads requires a separate process instance for each thread or group of threads. Further, a thread may depend on completion of certain states that are associated with one or more threads in another process. However, since threads are managed from separate process instances, information about their state may not be available to threads executing in other process instances. Therefore, when the execution of a thread is dependent on the state of another thread, it may not start executing until the previously executing thread on which it is dependent has completed execution. Therefore, it would be advantageous if threads or groups of threads could be managed from the same process so that the execution of threads could be triggered by the achievement of a state in another thread.
The present embodiment is a method, system, and apparatus for loading and managing tasks within a process instance on a computer system. The present embodiment novelly distinguishes groups of threads as a task and manages the execution of the threads in the task in the manner specified in a configuration file. The configuration file contains names of tasks and configuration information associated with each task. For example management of the order of execution of tasks may be defined to depend on the progress of execution, such as the state, of one or more other tasks. The termination of a single task or multiple tasks may be managed by the present embodiment. The output from a task may be directed to a computer-based input/output (I/O) device, such as a monitor, or to a file, or may be discarded.
Optionally, the configuration file may contain task-specific information related to configuring a task thereby providing a single place for task configuration information. Also, the configuration file may include symbolic references to specific actions related to the computer system and the symbolic references may be translated prior to execution of the task.
The present embodiment includes a task manager module and may operate with the product marketed under the trademark JAVA(trademark) Classes. However, the present embodiment is not limited in operation to a particular programming language or programming paradigm. Each class associated with the present embodiment may be executed without change by an independent process instance or by a shared process instance. Therefore, the present embodiment enables execution of tasks from an existing process instance, from a new process instance, or from a separate process instance on a different computer system. Also, more than one task may be started from a separate process instance. Additionally, the present embodiment may continue to manage execution of tasks even after the process instance that started the execution of the task has terminated.
Other aspects and advantages of the present invention will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, illustrating by way of example the principles of the invention.